package com.studentmanagement.model;

import java.util.Date;

public class Enrollment {
    private Integer enrollmentId;
    private Integer studentId;
    private Integer courseId;
    private Date enrollmentDate;
    private String grade;

    // 用于显示的额外字段
    private String studentName;
    private String courseName;

    public Enrollment() {
    }

    public Enrollment(Integer enrollmentId, Integer studentId, Integer courseId, Date enrollmentDate, String grade) {
        this.enrollmentId = enrollmentId;
        this.studentId = studentId;
        this.courseId = courseId;
        this.enrollmentDate = enrollmentDate;
        this.grade = grade;
    }

    // Getters and Setters
    public Integer getEnrollmentId() {
        return enrollmentId;
    }

    public void setEnrollmentId(Integer enrollmentId) {
        this.enrollmentId = enrollmentId;
    }

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Date getEnrollmentDate() {
        return enrollmentDate;
    }

    public void setEnrollmentDate(Date enrollmentDate) {
        this.enrollmentDate = enrollmentDate;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    @Override
    public String toString() {
        return "Enrollment [enrollmentId=" + enrollmentId + ", studentId=" + studentId +
                ", courseId=" + courseId + ", grade=" + grade + "]";
    }
}